// Copyright 2019 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License included
// in the file licenses/BSL.txt and at www.mariadb.com/bsl11.
//
// Change Date: 2022-10-01
//
// On the date above, in accordance with the Business Source License, use
// of this software will be governed by the Apache License, Version 2.0,
// included in the file licenses/APL.txt and at
// https://www.apache.org/licenses/LICENSE-2.0

// partially copied from https://github.com/code42day/stylus-font-face
// TODO: restrict glyph ranges and inline fonts
// TODO: possibly include other font types (eg ttf)
file($name, $ext, $path)
  $path + '/' + $name + '.' + $ext

font-face($family, $style='normal')
  @font-face
    font-family $family
    src url(file($family, 'woff2', '../fonts')) format('woff2'), url(file($family, 'woff', '../fonts')) format('woff')
    font-weight normal
    font-style $style
    text-rendering optimizeLegibility
